-- GENERATED SPELL FOR [Dread Tactician] --


function spell0_16959(pUnit, Event) --@Carrion Swarm,n/a--
pUnit:FullCastSpellOnTarget(33678,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_16959', 562, 1)
end

function spell1_16959(pUnit, Event) --@Inferno,n/a--
if charge_disp ~= 'na' then
pUnit:FullCastSpellOnTarget(33679,pUnit:GetMainTank ())
local charge_disp = 'na'
end
pUnit:RegisterEvent('Sorts_16959', 1, 1)
end

function spell2_16959(pUnit, Event) --@Sleep,n/a--
pUnit:FullCastSpellOnTarget(12098,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_16959', 21000, 1)
end

function spell3_16959(pUnit, Event) --@Summon Infernals,Self--
pUnit:FullCastSpellOnTarget(33675,pUnit)
pUnit:RegisterEvent('Sorts_16959', 610, 1)
end

function Sorts_16959(pUnit, Event)
local choix_sorts_16959 = math.random(0, 3)
if choix_sorts_16959 == 0 then
pUnit:RegisterEvent('spell0_16959', 1, 1)
end
if choix_sorts_16959 == 1 then
pUnit:RegisterEvent('spell1_16959', 1, 1)
end
if choix_sorts_16959 == 2 then
pUnit:RegisterEvent('spell2_16959', 1, 1)
end
if choix_sorts_16959 == 3 then
pUnit:RegisterEvent('spell3_16959', 1, 1)
end
end

function mob16959_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_16959', math.random(1500, 3000), 1)
end

function mob16959_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob16959_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob16959_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(16959, 1, 'mob16959_Action')
RegisterUnitEvent(16959, 2, 'mob16959_Leave')
RegisterUnitEvent(16959, 3, 'mob16959_Kill')
RegisterUnitEvent(16959, 4, 'mob16959_Die')
